/**
 * Created by Administrator on 2017/5/10.
 */
const mongoose = require('mongoose');
const shortid = require('shortid')
const Scheam = mongoose.Schema;
const UserScheam = new Scheam({
    _id:{
        type:String,
        default:shortid.generate,
        unique:true,
    },
    name:{
        type:String,
        require:true,
    },
    password:{
        type:Number,
        require:true,

    },
    email:{
        type:String,
    },
    motto:{
        type:String,
        default:'这逼太懒，啥玩意都没有留下..',
    },
    avator:{
        type:String,
        default:'/public/images/avatar.jpg'
    },
    createtime:{
        type:Date,
        default:Date.now,
    }
})
const User = mongoose.model('User',UserScheam);
module.exports = User;